import request from '@/utils/request'
// 获取经纪人列表
export function getAgentsList(params) {
  return request({
    url: '/agents',
    method: 'get',
    params
  })
}
// 新建经纪
export function addAgents(data) {
  return request({
    url: '/agents',
    method: 'post',
    data
  })
}
// 获取id详情
export function getAgentsById(id) {
  return request({
    url: '/agents/' + id,
    method: 'get'
  })
}

// 编辑经纪
export function editAgents(data) {
  return request({
    url: '/agents/' + data.id,
    method: 'put',
    data
  })
}
// 删除经纪
export function delAgents(id) {
  return request({
    url: '/agents/' + id,
    method: 'delete'
  })
}

